/**
 * \class AddExp AbsSyn/AddExp.h
 *
 * \brief implements add functionality as in <exp + exp>
 *
 *  Created on: 31 mar 2011
 *      Author: ytc0039
 *
 * \ingroup AbsSyn
 * \ingroup Expressions
 */

#ifndef ADDEXP_H_
#define ADDEXP_H_

#include <Interfaces/IExp.h>
#include <AbsSyn/AbsSyn.h>
#include <Generator/GenExp.h>

class IExpVisitor;

class AddExp : public IExp {
public:
	/**
	 * \brief Type definition of add generation expression
	 */
	typedef AbsSyn::IExpPtr (*genAddExp)(GenExp& genExp);
	/**
	 * \brief constructor with left hand side and right hand side
	 *
	 * expression for building a add expression with left hand side (lhs)
	 * relating to the left hand side of the operator , and right hand side.
	 *
	 * @param lhs , left hand side expression
	 * @param rhs , right hand side expression
	 */
	AddExp(const IExp *lhs,const IExp *rhs);
	/**
	 *
	 */
	virtual ~AddExp();

	virtual void accept(IExpVisitor *v);

	/**
	 * \addtogroup Cloneable
	 * @{
	 *
	 * \brief cloneable expression
	 *
	 * This clones the Identification expression, the return value should be deleted by the user.
	 */
	virtual AddExp* clone() const;
	/*! @} */


	static AbsSyn::IExpPtr generateAddExp(GenExp& genExp);
	/**
	 * \brief Implements IPrintable
	 *
	 *
	 * return string representation
	 */

	virtual std::string toString()const;
private:
	IExp *m_lhs;
	IExp *m_rhs;



};

#endif /* ADDEXP_H_ */
